package com.yy.controller;

import com.yy.service.TestService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * Author young
 * Date 2022/12/26 15:41
 * Description: SpringCloudAlibaba
 */
@RestController
@RequestMapping("circuit")
public class HystrixProviderCircuitBreakerController {
    
    @Resource
    private TestService testService;
    
    @GetMapping("test/{id}")
    public String test(@PathVariable("id")Integer id){
        return testService.getCircuitBreaker(id);
    }
}
